module dflipflop (
    input C,
    input G,
    input D,
    output reg Q
);

always@(posedge C) begin
    if(G) Q<= D;
end

endmodule